package com.thm.tfast.core.utils;

import java.util.Objects;

/**
 * @author THM
 * @date 2022/5/31
 * @desc
 */
public class RedisKeyUtil {

    public static String getKey(Object... params){
        if (Objects.isNull(params)) return "default";
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < params.length; i++) {
            String s = String.valueOf(params[i]);
            sb.append(s.trim()).append(":");
        }
        String key = sb.toString();
        return key.substring(0,key.length() - 1);
    }
}
